package com.gxgeek.springbootwebfluxlearning;

import com.gxgeek.springbootwebfluxlearning.handler.CityHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.reactive.function.server.RequestPredicates;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;

/**
 * @author gaoxing
 * @create 2018-04-14 下午4:50
 */
@Configuration
public class CityRouter {


//    @Bean
//    public RouterFunction<ServerResponse> routeCity(CityHandler cityHandler) {
//        return RouterFunctions
//                .route(RequestPredicates.GET("/hello")
//                                .and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
//                        cityHandler::helloCity);
//    }

}
